#include <iostream>
#include <vector>
void insertSort(std::vector<int> &arr)
{
	int arrLen = arr.size();
	if (arrLen <= 1)
	{
		return ;
	}

	for (int i = 1; i < arrLen; ++i)
	{
		for (int j = i; j > 0; --j)
		{
			if (arr[j] < arr[j - 1])
			{
				int t = arr[j];
				arr[j] = arr[j - 1];
				arr[j - 1] = t;
			}
		}
	}
	
}
int main()
{
	std::vector<int> arr{3,4,5,3,1,7,8,7,0,13,22,4,1,2,6,7382,33,2231,312312,4341,3131,1231241,1231232,122,3213,132312,3124,5754,7765,32423,4654,234234,23342,345,757,87,980};
	insertSort(arr);
	for (auto i : arr)
	{
		std::cout << i << std::endl;
	}
	return 0;
}

